const express=require('express');
const app=express();
app.listen(8080,()=>{
    console.log('服务器启动成功');
});

app.use(express.urlencoded({
   extended:false
}));
const ur=require('./routes/user.js');

app.use('/v1/users',ur);

app.use((err,req,res,next)=>{
    console.log(err);
	res.status(500).send({code:500,msg:'服务器端错误'});
});